<div id="recentes">
    <h1>Recentes</h1>
    <div id="recentes_bloco1">
        <?php
			$cont=0; 
			foreach($bolsas as $obj):
				$cont+=1;
				if($cont<=3)
				{
		?>
        			<br />
        			<h3><?php echo $obj['Bolsa']['titulo']; ?> - <?php echo $this->Html->link($obj['Curso']['nome'],
					array('controller' => 'Bolsa', 'action' => 'visualizar', $obj['Bolsa']['id']));
        			?></h3>
			        <p>Valor:<?php echo $obj['Bolsa']['valor']?> </p>
			        <br />
	    <?php
			}
			else
			{
			} 
		endforeach;?>
    </div>
	
    <div id="recentes_bloco2">
        	<?php
				$cont=0; 
				foreach($bolsas as $obj2):
					$cont+=1;
					if($cont>3 && $cont<=6)
					{
			?>
				<br />
        		<h3><?php echo $obj2['Bolsa']['titulo']; ?> - <?php echo $this->Html->link($obj['Curso']['nome'],
						array('BolsaController' => 'bolsas', 'action' => 'view', $obj2['Bolsa']['id']));
        			?></h3>
        		<p>Valor:<?php echo $obj2['Bolsa']['valor']?> </p>
        		<br />
		    <?php
				}
				else
				{
				} 
				endforeach;?>
    </div>
</div>
<div id="antigas">
    <h2>Ofertas</h2>
    <ul id="antigas_bloco1">
        <?php
			$cont=0; 
			foreach($bolsas as $obj):
				$cont+=1;
				if($cont<=4)
				{
		?>
        <li><h4><?php echo $obj2['TipoBolsa']['nome']; ?> - <?php echo $this->Html->link($obj['TipoBolsa']['nome'],
						array('BolsaController' => 'bolsas', 'action' => 'view', $obj2['Bolsa']['id']));
        			?></h4></li>
        <?php
				}
				else
				{
				} 
		endforeach;?>
    </ul>

    <ul id="antigas_bloco2">
         <?php
			$cont=0; 
			foreach($bolsas as $obj):
				$cont+=1;
				if($cont>=4 && $cont<=8)
				{
		?>
        <li><h4><?php echo $obj2['TipoBolsa']['nome']; ?> - <?php echo $this->Html->link($obj['TipoBolsa']['nome'],
						array('BolsaController' => 'bolsas', 'action' => 'view', $obj2['Bolsa']['id']));
        			?></h4></li>
        <?php
				}
				else
				{
				} 
		endforeach;?>
    </ul>

    <ul id="antigas_bloco3">
         <?php
			$cont=0; 
			foreach($bolsas as $obj):
				$cont+=1;
				if($cont>8 && $cont<=12)
				{
		?>
        <li><h4><?php echo $obj2['TipoBolsa']['nome']; ?> - <?php echo $this->Html->link($obj['TipoBolsa']['nome'],
						array('BolsaController' => 'bolsas', 'action' => 'view', $obj2['Bolsa']['id']));
        			?></h4></li>
        <?php
				}
				else
				{
				} 
		endforeach;?>
    </ul>
</div>